<div class="formPanel">
    <fieldset>
        <legend>Tìm kiếm</legend>
        <form id="search_form_article" action="<?php echo base_url(); ?>admin_combo/article/searchdata" method="post">
            <label>Tiêu đề:</label>
            <input type="text" id="txtTitle" name="txtTitle" size="30" value="" /><br />
            <label>Từ ngày:</label>
            <input type="text" id="txtDateFrom" name="txtDateFrom" /><br />
            <label>Đến ngày:</label>
            <input type="text" id="txtDateTo" name="txtDateTo" /><br />
            <label>Tác giả:</label>
            <input type="text" id="txtAuthor" name="txtAuthor" size="30" value="" /><br />
            <label>Username:</label>
            <input type="text" id="txtUsername" name="txtUsername" size="30" value="" /><br />
            <label>Thể loại</label>
            <select id="slCate" name="slCate">
                <option value="0">--None--</option>
                <?php
                    if(isset($info_cate))
                        callMenuCate($info_cate);
                ?>
            </select><br />
            <label>Trạng thái</label>
            <select id="slStatus" name="slStatus">
                <option value="0">--None--</option>
                <?php
                    if(isset($info_status))
                        callStatus($info_status);
                ?>
            </select>
            <br />
            <input type="submit" class="button" id="btnSearchArticle" name="btnSearchArticle" value="Tìm Kiếm" />
        </form>
    </fieldset>
</div>
<div align="center">
    <div id="recorddata">
        <table>
            <tr>
                <td class="title">Stt</td>
                <td class="title">Tiêu Đề</td>
                <td class="title">Thông Tin</td>
                <td class="title">Hình Ảnh</td>
                <td class="title">Ngày</td>
                <td class="title">Tác Giả</td>
                <td class="title">Thể Loại</td>
                <td class="title">Trạng Thái</td>
                <td class="title">User</td>
                <td class="title">Edit</td>
                <td class="title">Del</td>
            </tr>
            <?php
                if($info != "empty") {
                    $stt=0;
                    foreach($info as $item) {
                        $stt++;
                        echo "<tr>";
                        echo    "<td>$stt</td>";
                        echo    "<td>$item[art_title]</td>";
                        echo    "<td>$item[art_info]</td>";
                        echo    "<td><img width='50' height='50' src='".base_url()."uploads/article_main/".$item["art_img"]."'</td>";
                        echo    "<td>$item[art_date]</td>";
                        echo    "<td>$item[art_author]</td>";
                        echo    "<td>$item[cate_title]</td>";
                        if($item["status_name"]=="duyệt")
                            echo    "<td><font color='blue'>$item[status_name]</font></td>";
                        else if($item["status_name"]=="chưa duyệt")
                            echo    "<td><font color='green'>$item[status_name]</font></td>";
                        else if($item["status_name"]=="không duyệt")
                            echo    "<td><font color='red'>$item[status_name]</font></td>";
                        echo    "<td>$item[u_username]</td>";
                        echo    "<td class='action edit'><a href='".base_url()."admin_combo/article/edit/$item[art_id]' id='edit_$item[art_id]'><strong>Edit</strong></a></td>";
                        echo    "<td class='action del'><a href='".base_url()."admin_combo/article/del/$item[art_id]' id='del_$item[art_id]' 
                                    onclick='return confirm_delete(\"Bạn có chắc chắn muốn xóa?\");'><strong>Del</strong></a></td>";
                        echo "</tr>";
                    }
                }else
                    echo "<tr><td colspan='11'><font style='color: #99CC00; font-weight: bold;'>$info</font></td></tr>"
            ?>
        </table>
    </div>
<?php
    echo $this->pagination->create_links();
?>
<table width="100%">
    <tr>
        <td class="title">
            <a href="<?php echo base_url(); ?>admin_combo/article/add" class="add">Bài viết mới</a>
        </td>
    </tr>
</table>
</div>